/**
 * Created by yang on 2016/8/15.
 */
new Vue({
    el: '#app',
    data: {
        message: 'Hello Vue.js!',
        todos: [
            { text: 'Learn JavaScript' },
            { text: 'Learn Vue.js' },
            { text: 'Build Something Awesome' }
        ],
        test:true,
        raw_html:"<section>html 代码</section>",
        num:2
    },
    methods:{
        changeColor:function(){
            $("#app").css("color","red");
        },
        addTodo: function () {
            var text = this.message.trim()
            if (text) {
                this.todos.push({ text: text });
                this.message = '';
            }
        },
        removeTodo:function(index){
            this.todos.splice(index, 1)
        }
    }
})